package com.ttx.pattern.example.builder.after;

/**
 * @author TimFruit
 * @date 2019/7/2 14:39
 */

public class HighConfComputerBuilder implements ComputerBuilder {
    
    private Computer computer;
    
    public HighConfComputerBuilder() {
        this.computer=new Computer();
    }

    @Override public ComputerBuilder setCpu() {
        this.computer.setCpu("i7处理器");
        return this;
    }

    @Override public ComputerBuilder setMemory() {
        this.computer.setMemory("16G内存");
        return this;
    }

    @Override public ComputerBuilder setHardDisk() {
        this.computer.setHardDisk("1T固态硬盘");
        return this;
    }

    @Override public Computer build() {
        return this.computer;
    }
}
